package com.luyi;

import com.luyi.pojo.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        ApplicationContext beans = new ClassPathXmlApplicationContext("classpath:test.xml");

        User user = (User) beans.getBean("userBean");
        System.out.println("username:" + user.getUserName() + "  " + "age:" + user.getAge());
    }
}